package mvn21.service;

import javax.annotation.Resource;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

import mvn21.dao.UserDao;

//业务逻辑层
@Service
@Scope("prototype")
public class UserServiceImpl  {
	//@Autowired
	//@Qualifier("mysqldao") //按照名字进行对象的注入
	@Resource(name="sqlserverdao") //按照名字进行对象的注入
	private UserDao userdao;

	public UserDao getUserdao() {
		return userdao;
	}
	public void setUserdao(UserDao userdao) {
		this.userdao = userdao;
	}

	public void register() {
		System.out.println("注册成功！");
		userdao.addUser();
	}

}
